import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { Content } from 'native-base';
import Layout from './Layout';
import UserInfo from '../components/UserInfo';
import Account from '../components/Account';
import IconList from '../components/IconList';

export default class My extends Component {
    render() {
        const list = [
            {name:"我的卡券",icon:"copy"},
            {name:"预约记录",icon:"cloud"},
            {name:"消费记录",icon:"globe"}, 
            {name:"开具发票",icon:"github"},
        ];

        return (
            <Layout {...this.props}>
                <Content style={styles.content}>
                    <UserInfo />
                    <Account />
                    <View>
                        {list.map((item,index) => {
                            return <IconList key={index} {...item}/>
                        })}
                    </View>
                </Content>
            </Layout>
        );
    }
}
const styles = StyleSheet.create({
    content: {
        backgroundColor:"#fafafa",
        paddingLeft: 20,
        paddingRight: 20,
        paddingTop: 10
    }
})